home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_snowtowers.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  67 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SHS_SnowTowers.cog   Makes it snow between CT and BT.
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8.  
  9. symbols
  10.     
  11.     message crossed
  12.     message    pulse
  13.     
  14.     surface BTon            linkid=1
  15.     surface BToff            linkid=2
  16.     surface    CTon            linkid=1
  17.     surface CToff             linkid=2
  18.     surface windowon         linkid=1
  19.     surface windowoff       linkid=2
  20.  
  21.  
  22.     thing    ghost0
  23.               
  24.     template    particle
  25.     
  26.     int            dummy       local
  27.     int         crosschk=0  local            
  28.  
  29.     flex        pulsetime=.5
  30.     
  31. end
  32.  
  33. code
  34.  
  35.  
  36. crossed:
  37.     
  38.  
  39.     # make sure Indy player is sending message
  40.     If (GetSourceRef() != GetLocalPlayerThing()) return;
  41.  
  42.     # turn snow on
  43.     If ((crosschk == 0)  && (GetSenderId() == 1))
  44.     {
  45.         Print("snow on");
  46.         crosschk = 1;
  47.         setpulse(pulsetime);
  48.     }    
  49.     
  50.     # turn snow off
  51.     If ((crosschk == 1) && (GetSenderId() == 2))
  52.     {
  53.         Print("snow off");
  54.         crosschk=0;
  55.         setpulse(0);
  56.     }
  57.     return;
  58.  
  59. pulse:
  60.     dummy=CreateThing(particle, ghost0);
  61.     return;
  62.     
  63.  
  64. end
  65.  
  66.